
export function filterNum(val) {
    if(val){
        return val.replace(/(?=(?!\b)(?:\d{3})+(?!\d))/g,',')
    }else {
        return '--'
    }
}

export function filterZero(val) {
    if(val == 0.00){
        return 0
    }else {
        val = val + ''
        if(val.indexOf('.00')!==-1){
            val = val.substring(0,val.indexOf('.00'))
            return val
        }else{
            return val
        }
    }
}
